import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login.vue'
import Map from '../views/Map.vue'
import SystemManage from '../views/SystemManage.vue'
import DataManage from '../views/DataManage.vue'
import About from '../views/About.vue'
import DataScreen from '../views/DataScreen.vue'
import Law from '../views/Law.vue'
import Mobile from '../views/Mobile.vue'
import Monitor from '../views/Monitor.vue'

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/map',
    name: 'Map',
    component: Map
  },
  {
    path: '/system',
    name: 'SystemManage',
    component: SystemManage
  },
  {
    path: '/data',
    name: 'DataManage',
    component: DataManage
  },
  {
    path: '/about',
    name: 'About',
    component: About
  },
  {
    path: '/law',
    name: 'Law',
    component: Law
  },
  {
    path: '/mobile',
    name: 'Mobile',
    component: Mobile
  },
  {
    path: '/datascreen',
    name: 'DataScreen',
    component: DataScreen
  },
  {
    path: '/monitor',
    name: 'Monitor',
    component: Monitor
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 